//
// Created by wze-zero on 2024/9/13 013.
//
#include <iostream>

using namespace std;

int main() {
    int num, n = 0;
    int grade1, grade2, grade3;
    cin >> num;
    for (int i = 0; i < num; ++i) {
        cin >> grade1 >> grade2 >> grade3;
        (grade1 + grade2 + grade3) / 3 < 60 ? n++ : n;
    }
    cout << n << endl;
    return 0;
}